home *** CD-ROM | disk | FTP | other *** search
/ PC World 2007 December / PCWorld_2007-12_cd.bin / domacnost a kancelar / autoit / autoit-v3-setup.exe / Examples / Helpfile / _GUICtrlIpAddressSetRange.au3 < prev    next >
Text File  |  2007-09-08  |  737b  |  32 lines

  1. #include <GuiIPAddress.au3>
  2.  
  3. Opt("MustDeclareVars", 1)
  4.  
  5. _Main()
  6.  
  7. Func _Main()
  8.     Local $msg, $hgui, $setrange, $button, $hIPAddress
  9.     
  10.     $hgui = GUICreate("IP Address Control Create Example", 300, 150)
  11.     
  12.     $hIPAddress = _GUICtrlIpAddressCreate ($hgui, 10, 10, 125, 30, $WS_THICKFRAME)
  13.     
  14.     $setrange = GUICtrlCreateButton("Set Range", 10, 50, 80, 20)
  15.     
  16.     $button = GUICtrlCreateButton("Exit", 100, 100, 100, 25)
  17.     _GUICtrlIpAddressSet ($hIPAddress, "24.168.2.128")
  18.     GUISetState(@SW_SHOW)
  19.     
  20.     While 1
  21.         $msg = GUIGetMsg()
  22.         
  23.         Select
  24.             
  25.             Case $msg = $GUI_EVENT_CLOSE Or $msg = $button
  26.                 Exit
  27.             Case $msg = $setrange
  28.                 _GUICtrlIpAddressSetRange ($hIPAddress, 0, 198, 200)
  29.         EndSelect
  30.     WEnd
  31. EndFunc   ;==>_Main
  32.